# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=konversation
pkgver=1.7.5
pkgrel=2
arch="all !armhf"
url="https://konversation.kde.org/"
pkgdesc="A user-friendly and fully-featured IRC client"
license="GPL-2.0-or-later"
makedepends="
	extra-cmake-modules
	karchive-dev
	kbookmarks-dev
	kconfig-dev
	kconfigwidgets-dev
	kcoreaddons-dev
	kcrash-dev
	kdbusaddons-dev
	kdoctools-dev
	kglobalaccel-dev
	ki18n-dev
	kiconthemes-dev
	kidletime-dev
	kio-dev
	kitemviews-dev
	knotifications-dev
	knotifyconfig-dev
	kparts-dev
	kwallet-dev
	kwidgetsaddons-dev
	kwindowsystem-dev
	phonon-dev
	qca-dev
	qt5-qtbase-dev
	solid-dev
	"
source="https://download.kde.org/stable/konversation/$pkgver/src/konversation-$pkgver.tar.xz
	0001-qt-5.15.patch
	0002-unused-kemoticons.patch
	0003-missing-header.patch
	"
subpackages="$pkgname-doc $pkgname-lang"

build() {
	cmake -B build \
		-DCMAKE_BUILD_TYPE=None \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib
	cmake --build build
}

check() {
	cd build
	CTEST_OUTPUT_ON_FAILURE=TRUE ctest
}

package() {
	DESTDIR="$pkgdir" cmake --build build --target install
}

sha512sums="001534c7f6c5110ca5e210977cc4275e083f5c3704078a74aa573af659154e0fa4c3c960be08f41256db1ac4568f0734741bf10cfb2e15d9e6f6440250682504  konversation-1.7.5.tar.xz
056a3d6c17b04734e446b623b88dfa9fd4a90133c251b427460f5c6f3f85a52ad46abe92b055e8a5eb86f433f67e4645f9999d6124d3343466b741d99c11b076  0001-qt-5.15.patch
3158d47aad3920715bd9dc010585e4a2e7488872a24cac8f69bff8ebafc4445d54611756ad05399d8bbd1b4be37fb28d8566577fbc040559fdad3ab18927e3df  0002-unused-kemoticons.patch
b9b1b2e4b231d2a4beb63a6e757467ec0d32bfc9005dd990d7649cc6ac9c34d106b0b15bc3918490ef4ded81699e5d84161b3a1d8541aa6232ba485124b65386  0003-missing-header.patch"
